<template>
    <div class="page-100 login-register-part">
        <img v-if="isCheck" src="../../assets/waitcheck.png" class="image-check" alt="">
        <p v-if="isCheck" class="center-p-main">请等待审核</p>
        <img v-if="!isCheck" src="../../assets/meiyoutongguo.png" class="image-check" alt="">
        <p v-if="!isCheck" class="center-p-main">注册请求未通过审核</p>
        <p v-if="!isCheck" class="center-p-secondary">请修改资料后重新提交，或联系客服</p>

        <yd-button v-if="!isCheck" size="large" type="primary" @click.native="handleClick" style="background-color:#3cc8a8;color:white;height: 40px">修改资料</yd-button>

    </div>
</template>

<script>
    export default {
        name: "loginCheckinfo",
        data() {
            return {
                isCheck: true,
                loginUserState: '0',

            }
        },
        created() {
            //接受上个页面传值 在实例创建完成后被立即调用
            //loginUserState   //用户状态：0-正常，1-审批中，3-被拒绝 登录之后

            this.loginUserState = this.$route.params.loginUserState;

            if (this.loginUserState === '1') {
                this.isCheck = true;
            } else if (this.loginUserState === '3') {
                this.isCheck = false;
            }
        },
        methods: {
            handleClick() {
                //isregistry 0是注册页  3是修改资料页
                this.$router.push({name: 'loginRegistry', params: {isregistry: '3'}});


            },
        }
    }
</script>

<style lang="scss">
    @import "../login/login.scss";

    .image-check {
        width: 1.1rem;
        height: 1.1rem;
        margin-top: 1rem;
        margin-bottom: 0.2rem;
    }

    .center-p-main {
        text-align: center;
        font-size: 0.3rem;
        color: #b8b8b8;
    }

    .center-p-secondary {
        text-align: center;
        font-size: 0.2rem;
        color: #b8b8b8;

    }
</style>